package com.tanhua.admin.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/dashboard")
public class DashboardController {
    @GetMapping("/summary")
    public ResponseEntity getSummary(){
        Map<String,Integer> map = new HashMap();
        map.put("cumulativeUsers",6);//累计用户
        map.put("activePassMonth",6);//过去30天活跃用户
        map.put("activePassWeek",6);//过去7天活跃用户
        map.put("newUsersToday",6);//今日新增用户
        map.put("newUsersTodayRate",6);//今日新增用户涨跌率，单位百分数，正数为涨，负数为跌
        map.put("loginTimesToday",6);//今日登录次数
        map.put("loginTimesTodayRate",6);//今日登录次数涨跌率，单位百分数，正数为涨，负数为跌
        map.put("activeUsersToday",6);//今日活跃用户
        map.put("activeUsersTodayRate",6);//今日活跃用户涨跌率，单位百分数，正数为涨，负数为跌
        return ResponseEntity.ok(map);
    }
}
